package com.atguigu.spzx.order.service;

import com.atguigu.spzx.order.dto.OrderInfoDetailRespDto;
import com.atguigu.spzx.order.entity.OrderInfo;
import com.atguigu.spzx.order.vo.OrderInfoDetailRespVo;
import com.atguigu.spzx.order.vo.OrderInfoQueryRespVo;
import com.atguigu.spzx.order.vo.OrderInfoSaveReqVo;
import com.atguigu.spzx.order.vo.TradeRespVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * OrderInfoService
 * </p>
 *
 * @author flyduck
 * @since 2023/11/6
 */
public interface OrderInfoService {
    /**
     * 确认下单
     * @return
     */
    TradeRespVo getTrade();

    /**
     * 提交订单
     * @param vo
     * @return
     */
    Long submitOrder(OrderInfoSaveReqVo vo);

    /**
     * 获取订单详情
     * @param orderId
     * @return
     */
    OrderInfoDetailRespVo getOrderInfoById(Long orderId);

    /**
     * 立即购买
     * @param skuId
     * @return
     */
    TradeRespVo buy(Long skuId);

    /**
     * 获取订单分页列表
     * @param pageParam
     * @param orderStatus
     * @return
     */
    Page<OrderInfoQueryRespVo> getOrderInfoPageByOrderStatus(Page<OrderInfo> pageParam, Integer orderStatus);

    /**
     * 获取订单信息
     * @param orderNo
     * @return
     */
    OrderInfoDetailRespDto getOrderInfoByOrderNo(String orderNo);

    /**
     * 更新订单状态
     * @param orderNo
     * @param orderStatus
     */
    void updateOrderStatusByOrderNo(String orderNo, Integer orderStatus);
}
